package com.example.daggerdemo01.application;


import android.app.Application;

import com.example.daggerdemo01.component.AllComponent;
import com.example.daggerdemo01.component.DaggerAllComponent;
import com.example.daggerdemo01.module.DBModule;
import com.example.daggerdemo01.module.StudentModule;

public class MyApplication extends Application {
    private AllComponent mAllComponent;
    @Override
    public void onCreate() {
        super.onCreate();
        mAllComponent = DaggerAllComponent
                .builder()
                .studentModule(new StudentModule())
                .dBModule(new DBModule(getApplicationContext()))
                .build();
    }

    public AllComponent getAllComponent() {
        return mAllComponent;
    }
}